#!/bin/bash

[ -e /data_dir/config.ini ] || cp /default_config.ini /data_dir/config.ini

[ -e /data_dir/pre_exec ] && bash /data_dir/pre_exec
if [ -e /data_dir/extra_args ]; then
   /bitshares-2/programs/witness_node/witness_node --data-dir /data_dir `cat /data_dir/extra_args`
else
   /bitshares-2/programs/witness_node/witness_node --data-dir /data_dir
fi
[ -e /data_dir/post_exec ] && bash /data_dir/post_exec
